package com.zjx.listener;

import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 * @author zhaojiaxu
 * @date 2021/07/05 19:39
 **/
@Component
public class AppEventListener {

	public AppEventListener(){ System.out.print("AppEventListener...初始化");}
	@EventListener(MessageEvent.class)
	public void listenMessage(MessageEvent event){
		System.out.print("Message事件到达...."+event+"; 已发送邮件");
	}
}

